﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Project_KhuyenMaiVang.DataProvider;
using Project_KhuyenMaiVang.Models;

namespace Project_KhuyenMaiVang.DAO
{
    public class HinhThucThanhToanDAO : MyDataProvider
    {
        public List<HinhThucThanhToanDTO> GetListHinhThucThanhToan()
        {
            List<HinhThucThanhToanDTO> result = new List<HinhThucThanhToanDTO>();
            HinhThucThanhToanDTO adder;
            string QueryString = @"select * from HinhThucThanhToan";
            this._DataReader = this.executeQuery(QueryString);
            while (this._DataReader.Read())
            {
                adder = new HinhThucThanhToanDTO(this._DataReader.GetInt32(0), this._DataReader.GetString(1));
                result.Add(adder);
            }
            return result;
        }
    }
}